package org.dtrd.modules.record.util;

import org.dtrd.config.system.Constant;

/**
 * @author xiao
 * @date 2022/7/5 2:22 PM
 */
public class SugarRecordUtil {

    public static Integer judgeRecordStatus(Float value, Float limitLow, Float limitUp) {
        if (value != null && limitLow != null && limitUp != null) {
            if (value < limitLow) {
                return Constant.RecordStatus.LOWER.getType();
            } else if (value > limitUp) {
                return Constant.RecordStatus.HIGHER.getType();
            }
        }
        return Constant.RecordStatus.NORMAL.getType();
    }

}
